package com.sky.mapper;

import com.sky.entity.SetmealDish;
import net.sf.jsqlparser.statement.drop.Drop;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {


    @Select("select * from setmeal_dish where dish_id =#{id}")
    public SetmealDish GetSetmealDishByDishId(Long id);

    public void DropByDishId(List<Long> ids);


    public void add(SetmealDish setmealDish);

    @Select("select dish_id from setmeal_dish where setmeal_id=#{id}")
    public List<Long> getByCategoryIdToDishId(Long id);

    @Select("select * from setmeal_dish where setmeal_id=#{id}")
    public List<SetmealDish> getBySetmealId(Long id);

    @Delete("delete from setmeal_dish where setmeal_id=#{id}")
    public void dropBySetmealId(Long id);


}
